package com.jindy.module.oacopyconfig.service.impl;

import java.util.List;
import com.jindy.common.utils.DateUtils;
import com.jindy.module.oacopyconfig.domain.SyOaCopyConfig;
import com.jindy.module.oacopyconfig.mapper.SyOaCopyConfigMapper;
import com.jindy.module.oacopyconfig.service.ISyOaCopyConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 抄送配置Service业务层处理
 * 
 * @author jindy
 * @date 2023-05-11
 */
@Service
public class SyOaCopyConfigServiceImpl implements ISyOaCopyConfigService
{
    @Autowired
    private SyOaCopyConfigMapper syOaCopyConfigMapper;

    /**
     * 查询抄送配置
     * 
     * @param id 抄送配置主键
     * @return 抄送配置
     */
    @Override
    public SyOaCopyConfig selectSyOaCopyConfigById(Long id)
    {
        return syOaCopyConfigMapper.selectSyOaCopyConfigById(id);
    }

    /**
     * 查询抄送配置列表
     * 
     * @param syOaCopyConfig 抄送配置
     * @return 抄送配置
     */
    @Override
    public List<SyOaCopyConfig> selectSyOaCopyConfigList(SyOaCopyConfig syOaCopyConfig)
    {
        return syOaCopyConfigMapper.selectSyOaCopyConfigList(syOaCopyConfig);
    }

    /**
     * 新增抄送配置
     * 
     * @param syOaCopyConfig 抄送配置
     * @return 结果
     */
    @Override
    public int insertSyOaCopyConfig(SyOaCopyConfig syOaCopyConfig)
    {
        syOaCopyConfig.setCreateTime(DateUtils.getNowDate());
        return syOaCopyConfigMapper.insertSyOaCopyConfig(syOaCopyConfig);
    }

    /**
     * 修改抄送配置
     * 
     * @param syOaCopyConfig 抄送配置
     * @return 结果
     */
    @Override
    public int updateSyOaCopyConfig(SyOaCopyConfig syOaCopyConfig)
    {
        syOaCopyConfig.setUpdateTime(DateUtils.getNowDate());
        return syOaCopyConfigMapper.updateSyOaCopyConfig(syOaCopyConfig);
    }

    /**
     * 批量删除抄送配置
     * 
     * @param ids 需要删除的抄送配置主键
     * @return 结果
     */
    @Override
    public int deleteSyOaCopyConfigByIds(Long[] ids)
    {
        return syOaCopyConfigMapper.deleteSyOaCopyConfigByIds(ids);
    }

    /**
     * 删除抄送配置信息
     * 
     * @param id 抄送配置主键
     * @return 结果
     */
    @Override
    public int deleteSyOaCopyConfigById(Long id)
    {
        return syOaCopyConfigMapper.deleteSyOaCopyConfigById(id);
    }
}
